﻿using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using System.Threading.Tasks;

namespace DataTransformationTasks.BaseDriver;

public class Transport
{
    protected ILogger Logger { get; set; } = NullLogger.Instance;

    protected Transport(Machine machine)
    {
        Logger = LoggerFactory.CreateLogger(GetType().FullName);
        Machine = machine;
    }

    protected Machine Machine { get; }

    public virtual Task<dynamic> CreateAsync()
    {
        return Task.FromResult<dynamic>(null);
    }

    public virtual Task ConnectAsync()
    {
        return Task.CompletedTask;
    }

    public virtual Task SendAsync(params dynamic[] parameters)
    {
        return Task.CompletedTask;
    }

    public virtual Task OnGenerateIntermediateModelAsync(dynamic model)
    {
        return Task.CompletedTask;
    }
}